package com.example.elderlycare.controller;

import com.example.elderlycare.service.CommonService;
import com.example.elderlycare.service.entity.CommonListResponseBody;
import com.example.elderlycare.utils.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/common")
public class CommonController {

    @Resource
    CommonService commonService;


    /**
     * 获取员工状态列表
     *
     * @return 员工状态列表
     */
    @GetMapping("/emp_status")
    public Result<CommonListResponseBody> getEmployeeStatusList() {
        CommonListResponseBody res = commonService.getEmployeeStatusList();
        return Result.success(res);
    }

    /**
     * 获取员工学历列表
     *
     * @return 员工学历列表
     */
    @GetMapping("/educations")
    public Result<CommonListResponseBody> getEmployeeEducationList() {
        CommonListResponseBody res = commonService.getEmployeeEducationList();
        return Result.success(res);
    }

    /**
     * 获取证件类型列表
     *
     * @return 证件类型列表
     */
    @GetMapping("/certificates")
    public Result<CommonListResponseBody> getCertificateList() {
        CommonListResponseBody res = commonService.getCertificateList();
        return Result.success(res);
    }

    /**
     * 获取设备类型列表
     *
     * @return 设备类型列表
     */
    @GetMapping("/equipment_types")
    public Result<CommonListResponseBody> getEquipmentTypeList() {
        CommonListResponseBody res = commonService.getEquipmentTypeList();
        return Result.success(res);
    }

    /**
     * 获取发放方式列表
     *
     * @return 发放方式列表
     */
    @GetMapping("/issues")
    public Result<CommonListResponseBody> getIssueList() {
        CommonListResponseBody res = commonService.getIssueList();
        return Result.success(res);
    }

    /**
     * 获取部门列表
     *
     * @return 部门列表
     */
    @GetMapping("/departments")
    public Result<CommonListResponseBody> getDepartmentList() {
        CommonListResponseBody res = commonService.getDepartmentList();
        return Result.success(res);
    }

    /**
     * 获取职位列表
     *
     * @return 职位列表
     */
    @GetMapping("/positions")
    public Result<CommonListResponseBody> getPositionList() {
        CommonListResponseBody res = commonService.getPositionList();
        return Result.success(res);
    }

    /**
     * 获取亲属关系列表
     *
     * @return 亲属关系列表
     */
    @GetMapping("/relations")
    public Result<CommonListResponseBody> getRelationList() {
        CommonListResponseBody res = commonService.getRelationList();
        return Result.success(res);
    }

    /**
     * 获取设备状态列表
     *
     * @return 设备状态列表
     */
    @GetMapping("/equipment_status")
    public Result<CommonListResponseBody> getEquipmentStatusList() {
        CommonListResponseBody res = commonService.getEquipmentStatusList();
        return Result.success(res);
    }


    /**
     * 获取奖励类型列表
     *
     * @return 奖励类型列表
     */
    @GetMapping("/awards_types")
    public Result<CommonListResponseBody> getAwardsTypeList() {
        CommonListResponseBody res = commonService.getAwardsTypeList();
        return Result.success(res);
    }

    /**
     * 获取入住状态列表
     *
     * @return 入住状态列表
     */
    @GetMapping("/check_in_status")
    public Result<CommonListResponseBody> getCheckInStatusList() {
        CommonListResponseBody res = commonService.getCheckInStatusList();
        return Result.success(res);
    }

    /**
     * 获取培训类型列表
     *
     * @return 培训类型列表
     */
    @GetMapping("/training_types")
    public Result<CommonListResponseBody> getTrainingTypeList() {
        CommonListResponseBody res = commonService.getTrainingTypeList();
        return Result.success(res);
    }

    /**
     * 获取评估类型列表
     *
     * @return 评估类型列表
     */
    @GetMapping("/evaluation_types")
    public Result<CommonListResponseBody> getEvaluationTypeList() {
        CommonListResponseBody res = commonService.getEvaluationTypeList();
        return Result.success(res);
    }

    /**
     * 获取评估标准列表
     *
     * @return 评估标准列表
     */
    @GetMapping("/evaluation_standards")
    public Result<CommonListResponseBody> getEvaluationStandardList() {
        CommonListResponseBody res = commonService.getEvaluationStandardList();
        return Result.success(res);
    }

    /**
     * 获取投诉方式列表
     *
     * @return 投诉方式列表
     */
    @GetMapping("/complain_ways")
    public Result<CommonListResponseBody> getComplainWayList() {
        CommonListResponseBody res = commonService.getComplainWayList();
        return Result.success(res);
    }

    /**
     * 获取处理状态列表
     *
     * @return 处理状态列表
     */
    @GetMapping("/handle_status")
    public Result<CommonListResponseBody> getHandleStatusList() {
        CommonListResponseBody res = commonService.getHandleStatusList();
        return Result.success(res);
    }

    /**
     * 获取回访状态列表
     *
     * @return 回访状态列表
     */
    @GetMapping("/reply_status")
    public Result<CommonListResponseBody> getReplyStatusList() {
        CommonListResponseBody res = commonService.getReplyStatusList();
        return Result.success(res);
    }

    /**
     * 获取满意度列表
     *
     * @return 获取满意度列表
     */
    @GetMapping("/satisfactions")
    public Result<CommonListResponseBody> getSatisfactionList() {
        CommonListResponseBody res = commonService.getSatisfactionList();
        return Result.success(res);
    }

    /**
     * 获取咨询方式列表
     *
     * @return 咨询方式列表
     */
    @GetMapping("/consult_methods")
    public Result<CommonListResponseBody> getConsultMethodList() {
        CommonListResponseBody res = commonService.getConsultMethodList();
        return Result.success(res);
    }

    @GetMapping("/medias")
    public Result<CommonListResponseBody> getMediaList() {
        CommonListResponseBody res = commonService.getMediaList();
        return Result.success(res);
    }
}